package com.core.zyyz.pcmc.service.impl;

import java.util.List;
import java.util.Map;

import com.core.zyyz.pcmc.domain.DataShare;
import com.core.zyyz.pcmc.mapper.DataShareMapper;
import com.core.zyyz.pcmc.service.DataShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 数据分享Service业务层处理
 *
 * @author core
 * @date 2024-10-17
 */
@Service
public class DataShareServiceImpl implements DataShareService
{
    @Autowired
    private DataShareMapper dataShareMapper;

    /**
     * 查询数据分享
     *
     * @param ID 数据分享主键
     * @return 数据分享
     */
    @Override
    public DataShare selectDataShareByID(String ID)
    {
        return dataShareMapper.selectDataShareByID(ID);
    }

//    @Override
//    public List<Map<String, Object>> selectDataShareAllList(DataShare dataShare) {
//
//        return dataShareMapper.selectDataShareAllList(dataShare);
//    }

    /**
     * 查询数据分享列表
     *
     * @param dataShare 数据分享
     * @return 数据分享
     */
    @Override
    public List<DataShare> selectDataShareList(DataShare dataShare)
    {
        return dataShareMapper.selectDataShareList(dataShare);
    }

    /**
     * 新增数据分享
     *
     * @param dataShare 数据分享
     * @return 结果
     */
    @Override
    public int insertDataShare(DataShare dataShare)
    {
        return dataShareMapper.insertDataShare(dataShare);
    }

    /**
     * 修改数据分享
     *
     * @param dataShare 数据分享
     * @return 结果
     */
    @Override
    public int updateDataShare(DataShare dataShare)
    {
        return dataShareMapper.updateDataShare(dataShare);
    }

    /**
     * 批量删除数据分享
     *
     * @param IDs 需要删除的数据分享主键
     * @return 结果
     */
    @Override
    public int deleteDataShareByIDs(String[] IDs)
    {
        return dataShareMapper.deleteDataShareByIDs(IDs);
    }

    /**
     * 删除数据分享信息
     *
     * @param ID 数据分享主键
     * @return 结果
     */
    @Override
    public int deleteDataShareByID(String ID)
    {
        return dataShareMapper.deleteDataShareByID(ID);
    }
}
